<h2>关联选择</h2>
<div id="matrix-form-pick"
     class="pick-list"
     data-topple="hsList"
     data-load-url="centra/matrix/form/list.act"
     data--0="loadData:($(this).hsFind('%'))">
    <form class="findbox toolbox board row" action="" method="POST">
        <div class="col-xs-6">
            <div class="btn-group">
                <button type="button" class="commit btn btn-primary">确认选择</button>
            </div>
        </div>
        <div class="col-xs-6">
            <div class="input-group">
                <input type="search" name="wd" class="form-control input-search"/>
                <span class="input-group-btn">
                    <button type="submit" class="btn btn-default">查找</button>
                </span>
            </div>
        </div>
    </form>
    <div class="listbox panel panel-default table-responsive">
        <table class="table table-hover table-striped table-compressed">
            <thead>
                <tr>
                    <th data-fn="id[]" data-ft="_fork" class="_check">
                        <input type="checkbox" class="checkall" name="id[]"/>
                    </th>
                    <th data-fn="name" class="sortable">名称</th>
                    <th data-fn="furl.name" class="sortable">单元</th>
                    <th data-fn="mtime" data-ft="_htime" data-fill="v*1000" class="_htime sortable">修改时间</th>
                    <th data-fn="ctime" data-ft="_htime" data-fill="v*1000" class="_htime sortable">创建时间</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div class="pagebox clearfix"><em class="page-text">...</em></div>
</div>
<script type="text/javascript">
(function($) {
    var context = $("#matrix-form-pick");

    // 自适应滚屏
    hsFlexRoll(context.find(".listbox"), $("#main-context"));

    // 附加关联所需的额外配置参数
    context.data("_fill__fork", function(cel, v, n) {
        hsListFillFork.call(this, cel, v, n);
        var chk =  cel.find(  ".checkone"  );
        var cnf ;
        if (this._info.furl_id === "-") {
            cnf = eval("(" + this._info.conf + ")");
        } else {
            cnf = {
                 form    :                 this._info.id,
                 conf    : "centra/data/"+ this._info.id,
                "data-at": "centra/data/"+ this._info.id +"/search",
                "data-st": "centra/data/"+ this._info.id +"/pick.html",
                "data-rt": "centra/data/"+ this._info.id +"/info.html",
                "data-vk": "id" ,
                "data-tk": "name"
            };
        }
        chk.removeData();
        chk.data ( cnf );
    });
})(jQuery);
</script>